/*
 * Copyright Thoughtworks, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 * Application.css
 *
 * application-wide style standards, mostly related to html elements but also layouts
 */

@import "css_sass/base/mixins";

/**
 * =BODY
 */
* {
  font-family: "Open Sans", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
  line-height: 1;
}

/**
 * =TITLES
**/
h1,
h2,
h3,
h4 {
  font-weight: 500;
}

h1 {
  font-size: 24px;
  font-weight: normal;
}

h2 {
  font-size: 22px;
  font-weight: 300;
}

h3 {
  font-size: 14px;
  margin-bottom: 0.5em;
}

/**
 * =FORMS
**/
input,
button {
  font-family: "Open Sans", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
}

input,
select,
button,
textarea {
  /* this allows you to declare a size regardless of padding and border attributes  */
  box-sizing: border-box;
}

input:focus,
textarea:focus {
  border-color: #78d2f0;
  background-color: #ecf4f9;
  box-shadow: inset 0 0 3px #78d2f0;
}

label {
  display: block;
  font-size: 12px;
  margin-bottom: 5px;
}

input[disabled],
input:disabled {
  opacity: 0.8;
  background-color: #eee;
  color: #666;
  cursor: default;
}

select {
  outline: none;
  margin: 1px 0;
  padding: 2px 4px;
  width: 250px;
}

textarea {
  width: 100%;
  overflow: auto;
  resize: none;
}

button a {
  color: #fff;
}

input[type="text"],
input[type="password"],
input[type="file"],
input[type="url"],
textarea {
  border: 1px solid #ccc;
  box-shadow: inset 0 0 5px rgb(0, 0, 0, 19.9%);
  display: inline;
  font-size: 12px;
  outline: none;
  padding: 4px;
}

input[type="text"],
input[type="url"],
input[type="password"] {
  width: 250px;
}

input[type="radio"],
input[type="checkbox"] {
  margin: 4px;
}

button[disabled] {
  opacity: 0.5;
}

/**
 * =LINKS
**/
a {
  color: #1f66bd;
  cursor: pointer;
  text-decoration: none;
}

a:hover {
  color: #2980ec;
}

/**
 * =LISTS
**/

ul {
  float: left;
}

li {
  float: left;
  list-style: none;
}

/**
 * =TABLES
**/
table {
  border-collapse: collapse;
}

table th {
  text-align: left;
}

table td {
  vertical-align: middle;
}

.hidden {
  display: none;
}

@mixin floating-button($bottom: 60px) {
  border-radius: 10px;
  padding: 10px;
  background-color: #000;
  color: #fff;
  bottom: $bottom;
  right: 20px;
  z-index: 10000;
  display: none;
  width: 30px;
  text-align: center;
  position: fixed;
  opacity: 0.8;

  &:hover {
    opacity: 1;
    cursor: pointer;
  }
}

.back_to_top {
  @include floating-button($bottom: 120px);

  & {
    background: #000 image_url("back-to-top.png") no-repeat center 10px;
    padding-top: 30px;
    color: white;
  }
}


/* config changes */

.config-changes {
  overflow: auto;
  max-height: 400px;
  padding: 10px 0;
  font-size: 1.2em;
  color: #555;
}

.config-changes pre {
  padding: 3px;
}

.config-changes .line-info pre {
  background-color: #ececec;
  color: #9e9e9e;
}

.config-changes .add pre {
  color: #2e9202;
  background-color: #dfd;
}

.config-changes .remove pre {
  color: #b20000;
  background-color: #ffd4d4;
}
